<!DOCTYPE html>
<html>
<head>
    <title>博客文章列表</title>
</head>
<body>
    <h1>博客文章列表</h1>
    {% for post in posts %}
        <div>
            <h2><a href="{% url 'post_detail' post.pk %}">{{ post.title }}</a></h2>
            <p>{{ post.content|truncatewords:30 }}</p>
        </div>
    {% endfor %}
</body>
</html>
